package com.rd.student.dashuju.wangbo.exercise0728;

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;

public class TestOutPutStream {

    public static void main(String[] args) throws Exception{
        File file = new File("stream.txt");
        file.createNewFile();

        String content = "hello stream";
        OutputStream os = new FileOutputStream(file);
        byte[] by = content.getBytes();
        os.write(by);
        os.close();
    }
}
